
//! Converts a Bullet quaternion to an Irrlicht euler angle
//! angles in radians
void IrrPhysQuaternionToEuler(const btQuaternion &TQuat, btVector3 &TEuler);
//! Convert Euler to Quaternion 
//! angles in radians
void IrrPhysEulerToQuaternion( const irr::core::vector3df& v3fEuler, btQuaternion &quat );

//! get center of box to furtherest wall to use as radius of physics spher
irr::f32 IrrPhysGetMaxRadius(const irr::core::aabbox3d<irr::f32> &box,const irr::core::vector3df &scale);

//! rebuild bounding box from mesh vertexes
irr::scene::IAnimatedMeshSceneNode* IrrPhysRepairBoundingBox(irr::scene::IAnimatedMeshSceneNode* node);

//! get node position and convert to Bullet btTransform
void IrrPhysGetNodeTransform( irr::scene::ISceneNode* poSceneNode, btTransform& oTransform );

//! convert bullet matrix to irrlicht style matrix
inline void btTransformToIrrlichtMatrix(const btTransform& worldTrans, irr::core::matrix4 &matr)
{ 
    worldTrans.getOpenGLMatrix(matr.pointer()); 
} 
//! convert irrlicht style matrix to bullet style matrix
inline void btTransformFromIrrlichtMatrix(const irr::core::matrix4& irrmat, btTransform &transform)
{ 
    transform.setIdentity(); 
    transform.setFromOpenGLMatrix(irrmat.pointer()); 
}
